<html>
<body>
<script type="text/javascript">
var sum = 0;
var i;
for (i=3;i<1000;i++)
{
	if ((i%3 == 0) || (i%5 == 0))
  	{
  		sum = sum + i;
  	}
}
document.write(sum);
</script>
</body>
</html>




